<template>
  <div class="tab-item" v-show="isShow">
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'Tab',
  data () {
    return {
      index: 0
    }
  },
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  computed: {
    isShow () {
      return this.index === this.$parent.activeIndex
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
